/**  
* @Title: BookDaoImpl.java  
* @Package com.ssm.demo.dao.impl.book  
* @Description: TODO(用一句话描述该文件做什么)  
* @author jing Lei 
* @date 2018年12月25日  
* @version V1.0  
*/

package com.ssm.demo.dao.impl.book;

import java.util.List;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import com.ssm.demo.dao.book.IBookDao;
import com.ssm.demo.dao.impl.BaseIdaoImpl;
import com.ssm.demo.dao.mapper.book.IBookMapper;
import com.ssm.demo.model.Book;

/**
 * @ClassName: BookDaoImpl
 * @Description: TODO 书籍Dao的实现类
 * @author jing Lei
 * @date 2018年12月25日
 * 
 */

@Repository
public class BookDaoImpl extends BaseIdaoImpl<Book> implements IBookDao {
	@Resource
	private IBookMapper ibookMapper;

	/**
	 * 
	 * 基础方法实现
	 */
	@PostConstruct
	private void postconstruct() {
		baseMapper = ibookMapper;
	}

	/**
	 * 
	 * <p>
	 * Title: findByTypeBookId
	 * </p>
	 * <p>
	 * Description:
	 * </p>
	 * 
	 * @param typeBookId
	 *            书籍类型id
	 * @return List<Book>类型数据
	 * @see com.ssm.demo.dao.book.IBookDao#findByTypeBookId(int)
	 */
	@Override
	public List<Book> findByTypeBookId(int typeBookId) {
		return ibookMapper.findByTypeBookId(typeBookId);
	}

	/**
	 * 
	 * <p>
	 * Title: findByBookName
	 * </p>
	 * <p>
	 * Description:
	 * </p>
	 * 
	 * @param bookName
	 *            书名
	 * @return List<Book>类型数据
	 * @see com.ssm.demo.dao.book.IBookDao#findByBookName(java.lang.String)
	 */
	@Override
	public List<Book> findByBookName(String bookName) {
		return ibookMapper.findByBookName(bookName);
	}

	/**
	* <p>Title: query</p>  
	* <p>Description: </p>  
	* @param queryName
	* @param queryValue
	* @return  
	* @see com.ssm.demo.dao.book.IBookDao#query(java.lang.String, java.lang.String)  
	*/  
	
	@Override
	public List<Book> query(String queryName, String queryValue) {
		return ibookMapper.query(queryName, queryValue);
	}

}
